#define _CRT_SECURE_NO_WARNINGS 1


#include<stdio.h>
#include<stdlib.h>

int cmp_double(void* e1, void* e2)
{
	return (int)(*(double*)e1 - *(double*)e2);
}

void test2()
{
	double arr[10] = { 9.0,8.0,7.0,6.0,5.0,4.0,3.0,2.0,1.0,0.0 };
	int sz = sizeof(arr) / sizeof(arr[0]);
	qsort(arr, sz, sizeof(arr[0]), cmp_double);
	for (int i = 0; i < sz; i++)
	{
		printf("%f ", arr[i]);
	}
}


int main()
{
	test2();
	return 0;
}